<template>
	<div>
		<h1>详情页</h1>
	</div>
</template>

<script>
import { useRoute } from 'vue-router'
export default {
	setup() {
		// 获取路由 类似于 vue2 this.$route
		const route = useRoute()
		const id = route.params.id
		console.log(id);
	},
	created() {
		console.log(this.$route.params.id);
	}
}
</script>